Optimal. Leaf size=132 \[ -\frac {a \sin (e+f x) (d \cos (e+f x))^{n+1} \, _2F_1\left (\frac {1}{2},\frac {n+1}{2};\frac {n+3}{2};\cos ^2(e+f x)\right )}{d f (n+1) \sqrt {\sin ^2(e+f x)}}-\frac {b \sin (e+f x) (d \cos (e+f x))^n \, _2F_1\left (\frac {1}{2},\frac {n}{2};\frac {n+2}{2};\cos ^2(e+f x)\right )}{f n \sqrt {\sin ^2(e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.11, antiderivative size = 132, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {4225, 16, 2748, 2643} \[ -\frac {a \sin (e+f x) (d \cos (e+f x))^{n+1} \, _2F_1\left (\frac {1}{2},\frac {n+1}{2};\frac {n+3}{2};\cos ^2(e+f x)\right )}{d f (n+1) \sqrt {\sin ^2(e+f x)}}-\frac {b \sin (e+f x) (d \cos (e+f x))^n \, _2F_1\left (\frac {1}{2},\frac {n}{2};\frac {n+2}{2};\cos ^2(e+f x)\right )}{f n \sqrt {\sin ^2(e+f x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 16
Rule 2643
Rule 2748
Rule 4225
Rubi steps
\begin {align*} \int (d \cos (e+f x))^n (a+b \sec (e+f x)) \, dx &=\int (d \cos (e+f x))^n (b+a \cos (e+f x)) \sec (e+f x) \, dx\\ &=d \int (d \cos (e+f x))^{-1+n} (b+a \cos (e+f x)) \, dx\\ &=a \int (d \cos (e+f x))^n \, dx+(b d) \int (d \cos (e+f x))^{-1+n} \, dx\\ &=-\frac {b (d \cos (e+f x))^n \, _2F_1\left (\frac {1}{2},\frac {n}{2};\frac {2+n}{2};\cos ^2(e+f x)\right ) \sin (e+f x)}{f n \sqrt {\sin ^2(e+f x)}}-\frac {a (d \cos (e+f x))^{1+n} \, _2F_1\left (\frac {1}{2},\frac {1+n}{2};\frac {3+n}{2};\cos ^2(e+f x)\right ) \sin (e+f x)}{d f (1+n) \sqrt {\sin ^2(e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.13, size = 106, normalized size = 0.80 \[ -\frac {\sqrt {\sin ^2(e+f x)} \csc (e+f x) (d \cos (e+f x))^n \left (a n \cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {n+1}{2};\frac {n+3}{2};\cos ^2(e+f x)\right )+b (n+1) \, _2F_1\left (\frac {1}{2},\frac {n}{2};\frac {n+2}{2};\cos ^2(e+f x)\right )\right )}{f n (n+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 1.11, size = 0, normalized size = 0.00 \[ {\rm integral}\left ({\left (b \sec \left (f x + e\right ) + a\right )} \left (d \cos \left (f x + e\right )\right )^{n}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (b \sec \left (f x + e\right ) + a\right )} \left (d \cos \left (f x + e\right )\right )^{n}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 3.04, size = 0, normalized size = 0.00 \[ \int \left (d \cos \left (f x +e \right )\right )^{n} \left (a +b \sec \left (f x +e \right )\right )\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (b \sec \left (f x + e\right ) + a\right )} \left (d \cos \left (f x + e\right )\right )^{n}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int {\left (d\,\cos \left (e+f\,x\right )\right )}^n\,\left (a+\frac {b}{\cos \left (e+f\,x\right )}\right ) \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (d \cos {\left (e + f x \right )}\right )^{n} \left (a + b \sec {\left (e + f x \right )}\right )\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________